<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: owen
  Date: 2017/5/19
  Time: 17:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="side.jsp"/>
<jsp:include page="easyui.jsp"/>
<c:set var="BASE" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>Title</title>
</head>
<body style="text-align: center">
<p>
<a href="${BASE}/productType_create">添加产品大类</a>
<a href="${BASE}/productType_create_child">添加产品小类</a>

<p>

<div class="easyui-panel" style="text-align: center" >
    <a href="${BASE}/productType" class="easyui-linkbutton" data-options="toggle:true,group:'g1'">所有类别</a>
    <c:forEach var="productType" items="${productTypeList}">
        <a href="${BASE}/productType_showByParent?id=${productType.typeid}" class="easyui-linkbutton" data-options="toggle:true,group:'g1'">${productType.name}</a>
    </c:forEach>
</div>
<table id="tt" class="easyui-datagrid" style="text-align: center" width="70%" >
    <thead>
    <tr>
        <th field="name1" width="100">名称</th>
        <th field="name2" width="200">备注</th>
        <th field="name3" width="100">操作</th>

    </tr>
    </thead>
    <tbody>
    <c:forEach var="productType" items="${productTypeListChild}">
        <tr>

            <td>${productType.name}</td>
            <td>${productType.remark}</td>
            <td>
                <a href="${BASE}/productType_delete?id=${productType.typeid}">删除</a>
                <a href="${BASE}/productType_edit?id=${productType.typeid}">编辑</a>
            </td>
        </tr>
    </c:forEach>
    </tbody>
</table>
</body>
</html>
